<?php echo script::add('jquery');?><?php echo $editor_js; ?>
<script type="text/javascript">$(document).ready(function(){$('#submit_button').click(function(){var title=$('#title_box').val();if(title==''){alert('标题不能为空!');$('#title_box').focus();return false;}var content=KE.html('content_box');if(content==''){alert('页面内容不能为空!');KE.focus('content_box');return false;}var post_id=$('#post_id_box').val();var tag=$('#tag_box').val();var keyword=$('#meta_keyword_box').val();var description=$('#meta_description_box').val();$.post('<?php echo $this->get_action_url('ajax_edit_page'); ?>', {post_id:post_id,title:title,content:content,tag:tag,keyword:keyword,description:description}, function(data){switch(data){case '101':alert('恭喜,添加成功'); location.href='<?php echo $this->get_action_url('index'); ?>';break;case '100':alert('对不起，操作失败！请重新操作');break;default:alert(data);}});});});</script>
<table width="800" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="30" align="left">>><?php echo $site_name; ?></td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="800" border="0" cellspacing="5" cellpadding="0" style="margin:0px; border:0px; border:none;">
          <tr>
            <td width="100" height="30" align="right" bgcolor="#CCCCCC">标题：</td>
            <td width="475"><input type="text" name="title_box" id="title_box" value="<?php echo $post_data['post_title']; ?>"/><input type="hidden" name="post_id_box" id="post_id_box" value="<?php echo $post_data['post_id']; ?>" /></td>
            <td align="center">&nbsp;</td>
          </tr>
          <tr>
            <td width="100" height="420" align="right" valign="top" bgcolor="#CCCCCC">内容：</td>
            <td colspan="2" align="left" valign="top"><textarea name="content_box" style="width:640px; height:410px;" id="content_box"><?php echo $post_data['post_content']; ?></textarea></td>
          </tr>
          <tr>
            <td width="100" height="30" align="right" bgcolor="#CCCCCC">标签：</td>
            <td align="left"><input type="text" name="tag_box" id="tag_box" value="<?php echo $tag_str; ?>"/>
            </td>
            <td align="center">&nbsp;</td>
          </tr>
          <tr>
            <td height="30" align="right" bgcolor="#CCCCCC">keywords ： </td>
            <td height="30" colspan="2" align="left"><input type="text" name="meta_keyword_box" id="meta_keyword_box" value="<?php echo $meta_data['meta_keyword']; ?>"/></td>
          </tr>
          <tr>
            <td height="70" align="right" bgcolor="#CCCCCC">description： </td>
            <td height="30" colspan="2" align="left" valign="top"><textarea name="meta_description" id="meta_description_box"><?php echo $meta_data['meta_description']; ?></textarea></td>
          </tr>
          <tr>
            <td height="30" colspan="3" align="center"><input type="button" name="submit_button" value="提交" id="submit_button"/></td>
          </tr>
        </table></td>
      </tr>
</table>